<html>
<head>
    <title>Social Queen</title>
</head>
<style>
.div_accounts {width:300px;float:left;}
.div_messages {width:800px;float:left;}
</style>
<body>
Welcome to Social Queen
<hr>
<div class="div_accounts">
<ul>
%for social_id in idlist:
    <li><a href="/sq?uid={{uid}}&sid={{social_id}}">{{social_id}}</a></li>
%end
</ul>
</div>
<div class="div_messages">
%colors = ['#FFFFFF', '#E0E0E0']
%color_idx = 0
<table width="100%">
%for msg in messages:
<table bgcolor="{{colors[color_idx]}}" 
       cellspacing="0" cellpadding="3" width="100%">
    <tr valign="top"> <td>Message:</td>
         <td>{{msg['message_text']}}</td></tr>
    <tr valign="top"> <td>From:</td>
         <td>{{msg['social_id']}} ({{msg['message_source']}})</td></tr>
    <tr valign="top"> <td>At:</td>
         <td>{{msg['message_ts']}}</td></tr>
</table>
%color_idx = (color_idx + 1) % 2
%end
</table>
</div>
</body>
</html>
